import { FC } from 'react';
import { useRouteError, type ErrorResponse } from 'react-router-dom';

const ErrorPage: FC = () => {
  const error = useRouteError() as ErrorResponse & Error;
  console.log(error, 'error');
  return (
    <>
      <div>该页面不存在</div>
      <div>{error.statusText || error.message}</div>
    </>
  );
};

export default ErrorPage;
